package cn.mes.module.mes.dal.mysql.baseworkplan;

import java.util.*;

import cn.mes.framework.common.pojo.PageResult;
import cn.mes.framework.common.pojo.PageParam;
import cn.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.mes.framework.mybatis.core.mapper.BaseMapperX;
import cn.mes.module.mes.dal.dataobject.baseworkplan.BaseBomChildDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 投料单详细信息 Mapper
 *
 * @author 游创
 */
@Mapper
public interface BaseBomChildMapper extends BaseMapperX<BaseBomChildDO> {

    default PageResult<BaseBomChildDO> selectPage(PageParam reqVO, String workPlanInterId) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BaseBomChildDO>()
            .eq(BaseBomChildDO::getWorkPlanInterId, workPlanInterId)
            .orderByAsc(BaseBomChildDO::getEntryId));
    }

    default int deleteByWorkPlanInterId(String workPlanInterId) {
        return delete(BaseBomChildDO::getWorkPlanInterId, workPlanInterId);
    }

}
